#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void xuanze(int* arr, int sz)
{
	int m, n;
	for (m = 0; m < sz - 1; m++)
	{
		int k = m;
		for (n = m+1; n < sz; n++)
		{
			if (arr[k] > arr[n])
			{
				k = n;
			}
		}
		int a=arr[m];
		arr[m] = arr[k];
		arr[k] = a;
	}
}

void maopao(int* arr, int sz)
{
	int m, n;
	for (m = 0; m < sz - 1; m++)
	{
		int flag = 0;
		for (n = 0; n < sz - 1 - m; n++)
		{
			if (arr[n] < arr[n + 1])
			{
				int a = arr[n];
				arr[n] = arr[n + 1];
				arr[n + 1] = a;
				flag = 1;
			}
		}
		if (flag == 0)
		{
			break;
		}
	}
}
void printfN(int* arr, int sz)
{
	int m;
	for (m = 0; m < sz; m++)
	{
		printf("%d ", arr[m]);
	}
}
int main()
{
	char ch[] = "abcdef";
	int arr[] = { 7,465,67,584,76,959,55,3,3653,25,252 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	//maopao(arr, sz);
	xuanze(arr, sz);
	printfN(arr, sz);
	return 0;
}
